<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTextCharFormat Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTextCharFormat Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextCharFormat class provides formatting information for
characters in a <a href="qtextdocument.html">QTextDocument</a>.
<a href="#details">More...</a></p>

<p>Inherits <a href="qtextformat.html">QTextFormat</a>.</p><p>Inherited by <a href="qtextimageformat.html">QTextImageFormat</a> and <a href="qtexttablecellformat.html">QTextTableCellFormat</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtextcharformat.html#UnderlineStyle-enum">UnderlineStyle</a></b> { NoUnderline, SingleUnderline, DashUnderline, DotLine, ..., SpellCheckUnderline }</li><li><div class="fn" />enum <b><a href="qtextcharformat.html#VerticalAlignment-enum">VerticalAlignment</a></b> { AlignNormal, AlignSuperScript, AlignSubScript, AlignMiddle, AlignTop, AlignBottom }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextcharformat.html#QTextCharFormat">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#QTextCharFormat-2">__init__</a></b> (<i>self</i>, QTextCharFormat)</li><li><div class="fn" />QString <b><a href="qtextcharformat.html#anchorHref">anchorHref</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextcharformat.html#anchorName">anchorName</a></b> (<i>self</i>)</li><li><div class="fn" />QStringList <b><a href="qtextcharformat.html#anchorNames">anchorNames</a></b> (<i>self</i>)</li><li><div class="fn" />QFont <b><a href="qtextcharformat.html#font">font</a></b> (<i>self</i>)</li><li><div class="fn" />QFont.Capitalization <b><a href="qtextcharformat.html#fontCapitalization">fontCapitalization</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextcharformat.html#fontFamily">fontFamily</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#fontFixedPitch">fontFixedPitch</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#fontItalic">fontItalic</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#fontKerning">fontKerning</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextcharformat.html#fontLetterSpacing">fontLetterSpacing</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#fontOverline">fontOverline</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextcharformat.html#fontPointSize">fontPointSize</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#fontStrikeOut">fontStrikeOut</a></b> (<i>self</i>)</li><li><div class="fn" />QFont.StyleHint <b><a href="qtextcharformat.html#fontStyleHint">fontStyleHint</a></b> (<i>self</i>)</li><li><div class="fn" />QFont.StyleStrategy <b><a href="qtextcharformat.html#fontStyleStrategy">fontStyleStrategy</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#fontUnderline">fontUnderline</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextcharformat.html#fontWeight">fontWeight</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qtextcharformat.html#fontWordSpacing">fontWordSpacing</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#isAnchor">isAnchor</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextcharformat.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setAnchor">setAnchor</a></b> (<i>self</i>, bool&#160;<i>anchor</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setAnchorHref">setAnchorHref</a></b> (<i>self</i>, QString&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setAnchorName">setAnchorName</a></b> (<i>self</i>, QString&#160;<i>name</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setAnchorNames">setAnchorNames</a></b> (<i>self</i>, QStringList&#160;<i>names</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFont">setFont</a></b> (<i>self</i>, QFont&#160;<i>font</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontCapitalization">setFontCapitalization</a></b> (<i>self</i>, QFont.Capitalization&#160;<i>capitalization</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontFamily">setFontFamily</a></b> (<i>self</i>, QString&#160;<i>family</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontFixedPitch">setFontFixedPitch</a></b> (<i>self</i>, bool&#160;<i>fixedPitch</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontItalic">setFontItalic</a></b> (<i>self</i>, bool&#160;<i>italic</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontKerning">setFontKerning</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontLetterSpacing">setFontLetterSpacing</a></b> (<i>self</i>, float&#160;<i>spacing</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontOverline">setFontOverline</a></b> (<i>self</i>, bool&#160;<i>overline</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontPointSize">setFontPointSize</a></b> (<i>self</i>, float&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontStrikeOut">setFontStrikeOut</a></b> (<i>self</i>, bool&#160;<i>strikeOut</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontStyleHint">setFontStyleHint</a></b> (<i>self</i>, QFont.StyleHint&#160;<i>hint</i>, QFont.StyleStrategy&#160;<i>strategy</i>&#160;=&#160;QFont.PreferDefault)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontStyleStrategy">setFontStyleStrategy</a></b> (<i>self</i>, QFont.StyleStrategy&#160;<i>strategy</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontUnderline">setFontUnderline</a></b> (<i>self</i>, bool&#160;<i>underline</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontWeight">setFontWeight</a></b> (<i>self</i>, int&#160;<i>weight</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setFontWordSpacing">setFontWordSpacing</a></b> (<i>self</i>, float&#160;<i>spacing</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setTableCellColumnSpan">setTableCellColumnSpan</a></b> (<i>self</i>, int&#160;<i>atableCellColumnSpan</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setTableCellRowSpan">setTableCellRowSpan</a></b> (<i>self</i>, int&#160;<i>atableCellRowSpan</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setTextOutline">setTextOutline</a></b> (<i>self</i>, QPen&#160;<i>pen</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setToolTip">setToolTip</a></b> (<i>self</i>, QString&#160;<i>tip</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setUnderlineColor">setUnderlineColor</a></b> (<i>self</i>, QColor&#160;<i>color</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setUnderlineStyle">setUnderlineStyle</a></b> (<i>self</i>, UnderlineStyle&#160;<i>style</i>)</li><li><div class="fn" /><b><a href="qtextcharformat.html#setVerticalAlignment">setVerticalAlignment</a></b> (<i>self</i>, VerticalAlignment&#160;<i>alignment</i>)</li><li><div class="fn" />int <b><a href="qtextcharformat.html#tableCellColumnSpan">tableCellColumnSpan</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextcharformat.html#tableCellRowSpan">tableCellRowSpan</a></b> (<i>self</i>)</li><li><div class="fn" />QPen <b><a href="qtextcharformat.html#textOutline">textOutline</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtextcharformat.html#toolTip">toolTip</a></b> (<i>self</i>)</li><li><div class="fn" />QColor <b><a href="qtextcharformat.html#underlineColor">underlineColor</a></b> (<i>self</i>)</li><li><div class="fn" />UnderlineStyle <b><a href="qtextcharformat.html#underlineStyle">underlineStyle</a></b> (<i>self</i>)</li><li><div class="fn" />VerticalAlignment <b><a href="qtextcharformat.html#verticalAlignment">verticalAlignment</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextCharFormat class provides formatting information for
characters in a <a href="qtextdocument.html">QTextDocument</a>.</p>
<p>The character format of text in a document specifies the visual
properties of the text, as well as information about its role in a
hypertext document.</p>
<p>The font used can be set by supplying a font to the <a href="qtextcharformat.html#setFont">setFont</a>() function, and each
aspect of its appearance can be adjusted to give the desired
effect. <a href="qtextcharformat.html#setFontFamily">setFontFamily</a>() and
<a href="qtextcharformat.html#setFontPointSize">setFontPointSize</a>()
define the font's family (e.g. Times) and printed size; <a href="qtextcharformat.html#setFontWeight">setFontWeight</a>() and
<a href="qtextcharformat.html#setFontItalic">setFontItalic</a>()
provide control over the style of the font. <a href="qtextcharformat.html#setFontUnderline">setFontUnderline</a>(),
<a href="qtextcharformat.html#setFontOverline">setFontOverline</a>(),
<a href="qtextcharformat.html#setFontStrikeOut">setFontStrikeOut</a>(), and
<a href="qtextcharformat.html#setFontFixedPitch">setFontFixedPitch</a>()
provide additional effects for text.</p>
<p>The color is set with <a href="qtextformat.html#setForeground">setForeground</a>(). If the text
is intended to be used as an anchor (for hyperlinks), this can be
enabled with <a href="qtextcharformat.html#setAnchor">setAnchor</a>(). The <a href="qtextcharformat.html#setAnchorHref">setAnchorHref</a>() and
<a href="qtextcharformat.html#setAnchorNames">setAnchorNames</a>()
functions are used to specify the information about the hyperlink's
destination and the anchor's name.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="UnderlineStyle-enum" />QTextCharFormat.UnderlineStyle</h3><p>This enum describes the different ways drawing underlined
text.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.NoUnderline</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Text is draw without any underlining
decoration.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.SingleUnderline</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">A line is drawn using <a href="qt.html#PenStyle-enum">Qt.SolidLine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.DashUnderline</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Dashes are drawn using <a href="qt.html#PenStyle-enum">Qt.DashLine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.DotLine</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Dots are drawn using <a href="qt.html#PenStyle-enum">Qt.DotLine</a>;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.DashDotLine</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Dashs and dots are drawn using <a href="qt.html#PenStyle-enum">Qt.DashDotLine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.DashDotDotLine</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Underlines draw drawn using <a href="qt.html#PenStyle-enum">Qt.DashDotDotLine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.WaveUnderline</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">The text is underlined using a wave shaped
line.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextCharFormat.SpellCheckUnderline</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">The underline is drawn depending on the
QStyle.SH_SpellCeckUnderlineStyle style hint of the <a href="qapplication.html">QApplication</a> style. By default this is
mapped to WaveUnderline, on Mac OS X it is mapped to
DashDotLine.</td>
</tr>
</table>
<p><b>See also</b> <a href="qt.html#PenStyle-enum">Qt.PenStyle</a>.</p>


<h3 class="fn"><a name="VerticalAlignment-enum" />QTextCharFormat.VerticalAlignment</h3><p>This enum describes the ways that adjacent characters can be
vertically aligned.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.AlignNormal</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Adjacent characters are positioned in the
standard way for text in the writing system in use.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextCharFormat.AlignSuperScript</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Characters are placed above the base line for
normal text.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.AlignSubScript</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Characters are placed below the base line for
normal text.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.AlignMiddle</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The center of the object is vertically aligned
with the base line. Currently, this is only implemented for inline
objects.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.AlignBottom</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The bottom edge of the object is vertically
aligned with the base line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.AlignTop</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The top edge of the object is vertically
aligned with the base line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextCharFormat.AlignBaseline</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">The base lines of the characters are
aligned.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextCharFormat" />QTextCharFormat.__init__ (<i>self</i>)</h3><p>Constructs a new character format object.</p>


<h3 class="fn"><a name="QTextCharFormat-2" />QTextCharFormat.__init__ (<i>self</i>, <a href="qtextcharformat.html">QTextCharFormat</a>)</h3><h3 class="fn"><a name="anchorHref" />QString QTextCharFormat.anchorHref (<i>self</i>)</h3><p>Returns the text format's hypertext link, or an empty string if
none has been set.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setAnchorHref">setAnchorHref</a>().</p>


<h3 class="fn"><a name="anchorName" />QString QTextCharFormat.anchorName (<i>self</i>)</h3><h3 class="fn"><a name="anchorNames" />QStringList QTextCharFormat.anchorNames (<i>self</i>)</h3><p>Returns the anchor names associated with this text format, or an
empty string list if none has been set. If the anchor names are
set, text with this format can be the destination of a hypertext
link.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setAnchorNames">setAnchorNames</a>().</p>


<h3 class="fn"><a name="font" /><a href="qfont.html">QFont</a> QTextCharFormat.font (<i>self</i>)</h3><p>Returns the font for this character format.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="fontCapitalization" /><a href="qfont.html#Capitalization-enum">QFont.Capitalization</a> QTextCharFormat.fontCapitalization (<i>self</i>)</h3><p>Returns the current capitalization type of the font.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontCapitalization">setFontCapitalization</a>().</p>


<h3 class="fn"><a name="fontFamily" />QString QTextCharFormat.fontFamily (<i>self</i>)</h3><p>Returns the text format's font family.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontFamily">setFontFamily</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontFixedPitch" />bool QTextCharFormat.fontFixedPitch (<i>self</i>)</h3><p>Returns true if the text format's font is fixed pitch; otherwise
returns false.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontFixedPitch">setFontFixedPitch</a>()
and <a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontItalic" />bool QTextCharFormat.fontItalic (<i>self</i>)</h3><p>Returns true if the text format's font is italic; otherwise
returns false.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontItalic">setFontItalic</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontKerning" />bool QTextCharFormat.fontKerning (<i>self</i>)</h3><p>Returns true if the font kerning is enabled.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontKerning">setFontKerning</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontLetterSpacing" />float QTextCharFormat.fontLetterSpacing (<i>self</i>)</h3><p>Returns the current letter spacing percentage.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontLetterSpacing">setFontLetterSpacing</a>().</p>


<h3 class="fn"><a name="fontOverline" />bool QTextCharFormat.fontOverline (<i>self</i>)</h3><p>Returns true if the text format's font is overlined; otherwise
returns false.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontOverline">setFontOverline</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontPointSize" />float QTextCharFormat.fontPointSize (<i>self</i>)</h3><p>Returns the font size used to display text in this format.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontPointSize">setFontPointSize</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontStrikeOut" />bool QTextCharFormat.fontStrikeOut (<i>self</i>)</h3><p>Returns true if the text format's font is struck out (has a
horizontal line drawn through it); otherwise returns false.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontStrikeOut">setFontStrikeOut</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontStyleHint" /><a href="qfont.html#StyleHint-enum">QFont.StyleHint</a> QTextCharFormat.fontStyleHint (<i>self</i>)</h3><p>Returns the font style hint.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontStyleHint">setFontStyleHint</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontStyleStrategy" /><a href="qfont.html#StyleStrategy-enum">QFont.StyleStrategy</a> QTextCharFormat.fontStyleStrategy (<i>self</i>)</h3><p>Returns the current font style strategy.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontStyleStrategy">setFontStyleStrategy</a>()
and <a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontUnderline" />bool QTextCharFormat.fontUnderline (<i>self</i>)</h3><p>Returns true if the text format's font is underlined; otherwise
returns false.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontUnderline">setFontUnderline</a>() and
<a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="fontWeight" />int QTextCharFormat.fontWeight (<i>self</i>)</h3><p>Returns the text format's font weight.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontWeight">setFontWeight</a>(), <a href="qtextcharformat.html#font">font</a>(), and <a href="qfont.html#Weight-enum">QFont.Weight</a>.</p>


<h3 class="fn"><a name="fontWordSpacing" />float QTextCharFormat.fontWordSpacing (<i>self</i>)</h3><p>Returns the current word spacing value.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setFontWordSpacing">setFontWordSpacing</a>().</p>


<h3 class="fn"><a name="isAnchor" />bool QTextCharFormat.isAnchor (<i>self</i>)</h3><p>Returns true if the text is formatted as an anchor; otherwise
returns false.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setAnchor">setAnchor</a>(), <a href="qtextcharformat.html#setAnchorHref">setAnchorHref</a>(), and
<a href="qtextcharformat.html#setAnchorNames">setAnchorNames</a>().</p>


<h3 class="fn"><a name="isValid" />bool QTextCharFormat.isValid (<i>self</i>)</h3><p>Returns true if this character format is valid; otherwise
returns false.</p>


<h3 class="fn"><a name="setAnchor" />QTextCharFormat.setAnchor (<i>self</i>, bool&#160;<i>anchor</i>)</h3><p>If <i>anchor</i> is true, text with this format represents an
anchor, and is formatted in the appropriate way; otherwise the text
is formatted normally. (Anchors are hyperlinks which are often
shown underlined and in a different color from plain text.)</p>
<p>The way the text is rendered is independent of whether or not
the format has a valid anchor defined. Use <a href="qtextcharformat.html#setAnchorHref">setAnchorHref</a>(), and
optionally <a href="qtextcharformat.html#setAnchorNames">setAnchorNames</a>() to
create a hypertext link.</p>
<p><b>See also</b> <a href="qtextcharformat.html#isAnchor">isAnchor</a>().</p>


<h3 class="fn"><a name="setAnchorHref" />QTextCharFormat.setAnchorHref (<i>self</i>, QString&#160;<i>value</i>)</h3><p>Sets the hypertext link for the text format to the given
<i>value</i>. This is typically a URL like
"http://example.com/index.html".</p>
<p>The anchor will be displayed with the <i>value</i> as its
display text; if you want to display different text call <a href="qtextcharformat.html#setAnchorNames">setAnchorNames</a>().</p>
<p>To format the text as a hypertext link use <a href="qtextcharformat.html#setAnchor">setAnchor</a>().</p>
<p><b>See also</b> <a href="qtextcharformat.html#anchorHref">anchorHref</a>().</p>


<h3 class="fn"><a name="setAnchorName" />QTextCharFormat.setAnchorName (<i>self</i>, QString&#160;<i>name</i>)</h3><h3 class="fn"><a name="setAnchorNames" />QTextCharFormat.setAnchorNames (<i>self</i>, QStringList&#160;<i>names</i>)</h3><p>Sets the text format's anchor <i>names</i>. For the anchor to
work as a hyperlink, the destination must be set with <a href="qtextcharformat.html#setAnchorHref">setAnchorHref</a>() and the
anchor must be enabled with <a href="qtextcharformat.html#setAnchor">setAnchor</a>().</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextcharformat.html#anchorNames">anchorNames</a>().</p>


<h3 class="fn"><a name="setFont" />QTextCharFormat.setFont (<i>self</i>, <a href="qfont.html">QFont</a>&#160;<i>font</i>)</h3><p>Sets the text format's <i>font</i>.</p>
<p><b>See also</b> <a href="qtextcharformat.html#font">font</a>().</p>


<h3 class="fn"><a name="setFontCapitalization" />QTextCharFormat.setFontCapitalization (<i>self</i>, <a href="qfont.html#Capitalization-enum">QFont.Capitalization</a>&#160;<i>capitalization</i>)</h3><p>Sets the capitalization of the text that apppears in this font
to <i>capitalization</i>.</p>
<p>A font's capitalization makes the text appear in the selected
capitalization mode.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontCapitalization">fontCapitalization</a>().</p>


<h3 class="fn"><a name="setFontFamily" />QTextCharFormat.setFontFamily (<i>self</i>, QString&#160;<i>family</i>)</h3><p>Sets the text format's font <i>family</i>.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontFamily">fontFamily</a>() and <a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontFixedPitch" />QTextCharFormat.setFontFixedPitch (<i>self</i>, bool&#160;<i>fixedPitch</i>)</h3><p>If <i>fixedPitch</i> is true, sets the text format's font to be
fixed pitch; otherwise a non-fixed pitch font is used.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontFixedPitch">fontFixedPitch</a>() and
<a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontItalic" />QTextCharFormat.setFontItalic (<i>self</i>, bool&#160;<i>italic</i>)</h3><p>If <i>italic</i> is true, sets the text format's font to be
italic; otherwise the font will be non-italic.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontItalic">fontItalic</a>() and <a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontKerning" />QTextCharFormat.setFontKerning (<i>self</i>, bool&#160;<i>enable</i>)</h3><p>Enables kerning for this font if <i>enable</i> is true;
otherwise disables it.</p>
<p>When kerning is enabled, glyph metrics do not add up anymore,
even for Latin text. In other words, the assumption that width('a')
+ width('b') is equal to width("ab") is not neccesairly true.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontKerning">fontKerning</a>() and <a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontLetterSpacing" />QTextCharFormat.setFontLetterSpacing (<i>self</i>, float&#160;<i>spacing</i>)</h3><p>Sets the letter spacing of this format to the given
<i>spacing</i>, in percent. A value of 100 indicates default
spacing; a value of 200 doubles the amount of space a letter
takes.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontLetterSpacing">fontLetterSpacing</a>().</p>


<h3 class="fn"><a name="setFontOverline" />QTextCharFormat.setFontOverline (<i>self</i>, bool&#160;<i>overline</i>)</h3><p>If <i>overline</i> is true, sets the text format's font to be
overlined; otherwise the font is displayed non-overlined.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontOverline">fontOverline</a>() and <a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontPointSize" />QTextCharFormat.setFontPointSize (<i>self</i>, float&#160;<i>size</i>)</h3><p>Sets the text format's font <i>size</i>.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontPointSize">fontPointSize</a>() and
<a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontStrikeOut" />QTextCharFormat.setFontStrikeOut (<i>self</i>, bool&#160;<i>strikeOut</i>)</h3><p>If <i>strikeOut</i> is true, sets the text format's font with
strike-out enabled (with a horizontal line through it); otherwise
it is displayed without strikeout.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontStrikeOut">fontStrikeOut</a>() and
<a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontStyleHint" />QTextCharFormat.setFontStyleHint (<i>self</i>, <a href="qfont.html#StyleHint-enum">QFont.StyleHint</a>&#160;<i>hint</i>, <a href="qfont.html#StyleStrategy-enum">QFont.StyleStrategy</a>&#160;<i>strategy</i>&#160;=&#160;QFont.PreferDefault)</h3><p>Sets the font style <i>hint</i> and <i>strategy</i>.</p>
<p>Qt does not support style hints on X11 since this information is
not provided by the window system.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontStyleHint">fontStyleHint</a>(), <a href="qtextcharformat.html#setFont">setFont</a>(), and <a href="qfont.html#setStyleHint">QFont.setStyleHint</a>().</p>


<h3 class="fn"><a name="setFontStyleStrategy" />QTextCharFormat.setFontStyleStrategy (<i>self</i>, <a href="qfont.html#StyleStrategy-enum">QFont.StyleStrategy</a>&#160;<i>strategy</i>)</h3><p>Sets the font style <i>strategy</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontStyleStrategy">fontStyleStrategy</a>(),
<a href="qtextcharformat.html#setFont">setFont</a>(), and <a href="qfont.html#setStyleStrategy">QFont.setStyleStrategy</a>().</p>


<h3 class="fn"><a name="setFontUnderline" />QTextCharFormat.setFontUnderline (<i>self</i>, bool&#160;<i>underline</i>)</h3><p>If <i>underline</i> is true, sets the text format's font to be
underlined; otherwise it is displayed non-underlined.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontUnderline">fontUnderline</a>() and
<a href="qtextcharformat.html#setFont">setFont</a>().</p>


<h3 class="fn"><a name="setFontWeight" />QTextCharFormat.setFontWeight (<i>self</i>, int&#160;<i>weight</i>)</h3><p>Sets the text format's font weight to <i>weight</i>.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontWeight">fontWeight</a>(), <a href="qtextcharformat.html#setFont">setFont</a>(), and <a href="qfont.html#Weight-enum">QFont.Weight</a>.</p>


<h3 class="fn"><a name="setFontWordSpacing" />QTextCharFormat.setFontWordSpacing (<i>self</i>, float&#160;<i>spacing</i>)</h3><p>Sets the word spacing of this format to the given
<i>spacing</i>, in pixels.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtextcharformat.html#fontWordSpacing">fontWordSpacing</a>().</p>


<h3 class="fn"><a name="setTableCellColumnSpan" />QTextCharFormat.setTableCellColumnSpan (<i>self</i>, int&#160;<i>atableCellColumnSpan</i>)</h3><h3 class="fn"><a name="setTableCellRowSpan" />QTextCharFormat.setTableCellRowSpan (<i>self</i>, int&#160;<i>atableCellRowSpan</i>)</h3><h3 class="fn"><a name="setTextOutline" />QTextCharFormat.setTextOutline (<i>self</i>, <a href="qpen.html">QPen</a>&#160;<i>pen</i>)</h3><p>Sets the pen used to draw the outlines of characters to the
given <i>pen</i>.</p>
<p><b>See also</b> <a href="qtextcharformat.html#textOutline">textOutline</a>().</p>


<h3 class="fn"><a name="setToolTip" />QTextCharFormat.setToolTip (<i>self</i>, QString&#160;<i>tip</i>)</h3><p>Sets the tool tip for a fragment of text to the given
<i>text</i>.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextcharformat.html#toolTip">toolTip</a>().</p>


<h3 class="fn"><a name="setUnderlineColor" />QTextCharFormat.setUnderlineColor (<i>self</i>, <a href="qcolor.html">QColor</a>&#160;<i>color</i>)</h3><p>Sets the underline color used for the characters with this
format to the <i>color</i> specified.</p>
<p><b>See also</b> <a href="qtextcharformat.html#underlineColor">underlineColor</a>().</p>


<h3 class="fn"><a name="setUnderlineStyle" />QTextCharFormat.setUnderlineStyle (<i>self</i>, <a href="qtextcharformat.html#UnderlineStyle-enum">UnderlineStyle</a>&#160;<i>style</i>)</h3><p>Sets the style of underlining the text to <i>style</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qtextcharformat.html#underlineStyle">underlineStyle</a>().</p>


<h3 class="fn"><a name="setVerticalAlignment" />QTextCharFormat.setVerticalAlignment (<i>self</i>, <a href="qtextcharformat.html#VerticalAlignment-enum">VerticalAlignment</a>&#160;<i>alignment</i>)</h3><p>Sets the vertical alignment used for the characters with this
format to the <i>alignment</i> specified.</p>
<p><b>See also</b> <a href="qtextcharformat.html#verticalAlignment">verticalAlignment</a>().</p>


<h3 class="fn"><a name="tableCellColumnSpan" />int QTextCharFormat.tableCellColumnSpan (<i>self</i>)</h3><h3 class="fn"><a name="tableCellRowSpan" />int QTextCharFormat.tableCellRowSpan (<i>self</i>)</h3><h3 class="fn"><a name="textOutline" /><a href="qpen.html">QPen</a> QTextCharFormat.textOutline (<i>self</i>)</h3><p>Returns the pen used to draw the outlines of characters in this
format.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setTextOutline">setTextOutline</a>().</p>


<h3 class="fn"><a name="toolTip" />QString QTextCharFormat.toolTip (<i>self</i>)</h3><p>Returns the tool tip that is displayed for a fragment of
text.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setToolTip">setToolTip</a>().</p>


<h3 class="fn"><a name="underlineColor" /><a href="qcolor.html">QColor</a> QTextCharFormat.underlineColor (<i>self</i>)</h3><p>Returns the color used to underline the characters with this
format.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setUnderlineColor">setUnderlineColor</a>().</p>


<h3 class="fn"><a name="underlineStyle" /><a href="qtextcharformat.html#UnderlineStyle-enum">UnderlineStyle</a> QTextCharFormat.underlineStyle (<i>self</i>)</h3><p>Returns the style of underlining the text.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setUnderlineStyle">setUnderlineStyle</a>().</p>


<h3 class="fn"><a name="verticalAlignment" /><a href="qtextcharformat.html#VerticalAlignment-enum">VerticalAlignment</a> QTextCharFormat.verticalAlignment (<i>self</i>)</h3><p>Returns the vertical alignment used for characters with this
format.</p>
<p><b>See also</b> <a href="qtextcharformat.html#setVerticalAlignment">setVerticalAlignment</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>